home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / var / db / pkg / dev-python / pygtk-2.6.1 / pygtk-2.6.1.ebuild < prev    next >
Text File  |  2006-01-20  |  3KB  |  84 lines

  1. # Copyright 1999-2005 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. # $Header: /var/cvsroot/gentoo-x86/dev-python/pygtk/pygtk-2.6.1.ebuild,v 1.13 2005/10/03 11:41:51 hardave Exp $
  4.  
  5. inherit gnome.org python flag-o-matic
  6.  
  7. DESCRIPTION="GTK+2 bindings for Python"
  8. HOMEPAGE="http://www.pygtk.org/"
  9. SRC_URI="${SRC_URI}
  10.     doc? ( http://www.pygtk.org/dist/pygtk2reference.tbz2 )"
  11.  
  12. LICENSE="LGPL-2.1"
  13. SLOT="2"
  14. KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 sparc x86"
  15. IUSE="gnome opengl doc"
  16.  
  17. RDEPEND=">=dev-lang/python-2.3
  18.     >=x11-libs/gtk+-2.6.0
  19.     >=dev-libs/glib-2.4.0
  20.     !arm? ( dev-python/numeric )
  21.     gnome? ( >=gnome-base/libglade-2.3.6 )
  22.     opengl? ( virtual/opengl
  23.         dev-python/pyopengl
  24.         >=x11-libs/gtkglarea-1.99 )"
  25. DEPEND="${RDEPEND}
  26.     >=dev-util/pkgconfig-0.9"
  27.  
  28. src_unpack() {
  29.     unpack ${A}
  30.     if use doc; then
  31.         unpack pygtk2reference.tbz2
  32.     fi
  33.     # disable pyc compiling
  34.     mv ${S}/py-compile ${S}/py-compile.orig
  35.     ln -s /bin/true ${S}/py-compile
  36. }
  37.  
  38. src_compile() {
  39.     use hppa && append-flags -ffunction-sections
  40.     econf --enable-thread || die
  41.     # possible problems with parallel builds (#45776)
  42.     emake -j1 || die
  43. }
  44.  
  45. src_install() {
  46.     make DESTDIR="${D}" install || die
  47.     dodoc AUTHORS ChangeLog INSTALL MAPPING NEWS README THREADS TODO
  48.     rm examples/Makefile*
  49.     cp -r examples ${D}/usr/share/doc/${PF}/
  50.  
  51.     python_version
  52.     mv ${D}/usr/$(get_libdir)/python${PYVER}/site-packages/pygtk.py \
  53.         ${D}/usr/$(get_libdir)/python${PYVER}/site-packages/pygtk.py-2.0
  54.     mv ${D}/usr/$(get_libdir)/python${PYVER}/site-packages/pygtk.pth \
  55.         ${D}/usr/$(get_libdir)/python${PYVER}/site-packages/pygtk.pth-2.0
  56.  
  57.     if use doc; then
  58.         cd ${S}/../pygtk2reference
  59.         dohtml -r *
  60.     fi
  61. }
  62.  
  63. src_test() {
  64.     cd tests
  65.     make check-local
  66. }
  67.  
  68. pkg_postinst() {
  69.     python_version
  70.     python_mod_optimize /usr/share/pygtk/2.0/codegen /usr/$(get_libdir)/python${PYVER}/site-packages/gtk-2.0
  71.     alternatives_auto_makesym /usr/$(get_libdir)/python${PYVER}/site-packages/pygtk.py pygtk.py-[0-9].[0-9]
  72.     alternatives_auto_makesym /usr/$(get_libdir)/python${PYVER}/site-packages/pygtk.pth pygtk.pth-[0-9].[0-9]
  73.     python_mod_compile /usr/$(get_libdir)/python${PYVER}/site-packages/pygtk.py
  74. }
  75.  
  76. pkg_postrm() {
  77.     python_version
  78.     python_mod_cleanup /usr/share/pygtk/2.0/codegen
  79.     python_mod_cleanup
  80.     rm -f ${ROOT}/usr/$(get_libdir)/python${PYVER}/site-packages/pygtk.{py,pth}
  81.     alternatives_auto_makesym /usr/$(get_libdir)/python${PYVER}/site-packages/pygtk.py pygtk.py-[0-9].[0-9]
  82.     alternatives_auto_makesym /usr/$(get_libdir)/python${PYVER}/site-packages/pygtk.pth pygtk.pth-[0-9].[0-9]
  83. }
  84.